package zheng;

public class 组合 {
	public static void main(String[] args) {
		int a, b, c, count=0;
		for (a = 1; a < 5; a++) {
			for (b = 1; b < 5; b++) {
				if(b!=a){
					for (c = 1; c < 5; c++) {
						if (b != c && a != c) {
							System.out.println(a * 100 + b * 10 + c);
							count++;
						}
						
					}
				}
				
			}
		}
		System.out.println(count);
	}
	// 换成逻辑或的话，如何把111 222 333 444打出来
}
